package com.example.mytestapplication;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.Log;
import android.widget.ImageView;
import android.widget.Toast;

import org.simple.eventbus.EventBus;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketException;

/**
 * Created by wei on 2017/6/23.
 */

public class ScanActivity2 extends Activity {
    private static String LOG_TAG = "WifiBroadcastActivity";
    private static UdpHelper udpHelper;
    private Context context;
    private volatile boolean start = true;

    private volatile String address = null;
    public static final int DEFAULT_PORT = 43708;
    private static final int CLIENT_PORT = 43608;
    private static final int MAX_DATA_PACKET_LENGTH = 40;
    private byte[] buffer = new byte[MAX_DATA_PACKET_LENGTH];
    private String come;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layout_come);
        ImageView imageView = (ImageView) findViewById(R.id.img);
        imageView.setImageResource(R.drawable.starting_leave_scan);
//        UdpHelper udpHelper = UdpHelper.getInstance(this);
        EventBus.getDefault().post("","LEAVE");
    }



}
